package vip.liux.front.application.service.payment;

import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import vip.liux.front.domain.shared.payment.IPaymentRequestProductExtraParameterConfiguration;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Map;

@Getter
@Setter
public class PaymentRequestProductCreateDto implements Serializable {
    /**
     * 商品代码
     */
    @NotBlank
    private String code;
    /**
     * 商品名称
     */
    @NotBlank
    private String name;

    /**
     * 商品单价
     */
    private BigDecimal unitPrice;

    /**
     * 商品数量
     */
    @Size(min = 1)
    private int count;

    /**
     * 商品总价
     */
    @Nullable
    private BigDecimal totalPrice;

    private Map<String, IPaymentRequestProductExtraParameterConfiguration> extraProperties;

    public PaymentRequestProductCreateDto() {
        this.extraProperties = Map.of();
    }
}
